package com.personal.book1.controller;

import com.personal.book1.model.BookInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller
public class BookControllerTest {

    // 将BookInfo注入进来，获取我们初始化的三个对象
    //@Qualifier("b3")
    //@Autowired

    @Resource(name = "b3")
    private BookInfo b1;

    public void hello() {
        System.out.println("hello,BookControllerTest");
        System.out.println(b1);
    }
}
